/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */


function validateForm(){
                
            
    if (!validateEmail(document.forms["login"]["email"].value) ){
        document.getElementById("emailError").innerHTML="Email Address not Valid";
    }
    else 
        document.getElementById("emailError").innerHTML="";
    if (!validatePassword(document.forms["login"]["password"].value)){
        document.getElementById("passwordError").innerHTML="Password is too short( it must be at least 6 characters long";
    }
    else 
        document.getElementById("passwordError").innerHTML="";
                
    return (validateEmail(document.forms["login"]["email"].value) && validatePassword(document.forms["login"]["password"].value));
}
            
            
function inputFocus(i){
    if(i.value==i.defaultValue){
        i.value="";
        i.style.color="#000";
    }
}
function inputBlur(i){
    if(i.value==""){
        i.value=i.defaultValue;
        i.style.color="#888";
    }
}